Repository navigation
Conversation
…13357) The day-form branch of the shared formatter is unreachable and no code produces the design §4 compound form. These tests pin the specified behaviour first; the formatter fix follows.
…meth:2 (#13357) The shared §4 formatter checked the calendar form before the day form, and every ≥48h-wide range crosses a Chicago day boundary, so the day-form branch could never fire and no code produced the design's compound form. Check the day form (span ≥ 48h, future ranges) first; render compound days+hours when either bound is not an exact tenth of a day, plain decimal days otherwise; in-progress ranges stay calendar. Bumps the methodology to c4-meth:2 with a log entry (§6) — stored rendered strings are what the scorer grades.
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 42 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
This was referenced Nov 23, 2026
C4: quota-arrival.ts has its own renderPredictionRange without the §4 compound/calendar forms
#13408
Closed
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #13357
Summary
The design (§4) specifies the day form for span ≥ 48h and the compound form for mixed spans, but the shared formatter in
pm-stack/aggregator/src/quota-downtime.tsimplemented neither: the cross-day calendar check ran before the span check, and every ≥48h-wide range crosses a Chicago day boundary, so the day-form branch was provably unreachable; no code produced the compound form.This slice decides the design is right and fixes the formatter:
2 days 4 hours to up to 5 days 4 hours— per the design's quoted shape; otherwise plain decimal days (2.5 to 5 days).renderedstrings, so it rides a methodology-log entry (§6): version bumped toc4-meth:2(C4_METHODOLOGY_VERSION, shared by the downtime and reset-duration kinds) with ac4-meth:2entry appended topm-stack/aggregator/c4-methodology-log.jsonl.Decisions recorded (decide-and-proceed, FDR-0013): "span" is the range width (latest − earliest), as both shipped formatters and the issue read it; the design's example numbers ("2.5 to 3.7 days", width 28.8h) illustrate the forms' shapes, not the threshold — if the design owner meant an offset-based span, §4 needs that correction, flagged on the issue.
quota-arrival.tskeeps its own separaterenderPredictionRange(duration/day only); unifying the two formatters is a follow-up, not this slice.Evidence
Failing-first, then fixed, by remote dispatch (fleet-command.yml workflow;
fleet queue dispatchis blocked by #13185):bun test src/quota-downtime.test.ts src/quota-reset-duration.test.tsat the test-only commit: 30 pass, 3 fail (the 3 new tests, each receiving the calendar form, e.g. "between Wednesday evening and Saturday morning" instead of "2.5 to 5 days").Not built or tested locally; no laptop or sandbox builds/tests (per the remote-dispatch directive).
Merge Danger
renderedstrings change for future ≥48h-wide ranges (calendar → day/compound). That is the intended, methodology-visible change (hence c4-meth:2); the scorer grades stored strings, so records issued before/after this PR are attributable bymethodology_version.c4-meth:2(they share the constant); arrival records still carryc4-meth:1(that formatter is untouched).{ "direct_parent": null, "links": [], "lineage": { "design": null, "roadmap_item": null, "priority": null }, "pm_meta": 1, "provenance": { "queue_id": null, "scheduled_start": null, "picked_up_at": null, "work_started_at": null, "created_at": "2026-11-23T15:31:19Z", "session_id": null, "lane": null, "host": "htch-runtime", "worktree": "/home/hatch/workspace/github-work/code-13357", "model": null, "lane_start_issues": [], "workspace_ref": { "kind": "worktree", "id": "/home/hatch/workspace/github-work/code-13357", "repo": "developing-today/code", "branch": "xaltha/13357-c4-compound-day-form", "sha": "ad98345d82aed8ffced52ff4752b685887fe071a" }, "auth_subject": "xaltha", "stamped_by": "fleet 0.1.0 (native)" } }Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.